Modify Dial Plan Content

This request allows you to add or remove phone numbers in a specific dial plan for a specific site location.

URL

Copy
{{baseUrl}}/api/v2/customer/{{customerId}}/sitelocation/{{siteLocationId}}/dialplan/{dialplanId}

Method

PATCH

Request Parameters

Parameters

Type

Description

customerId

string($uuid)

Unique customer 'Id' created when customer is added. Extract this value from Get Services Brief Details (V3) request.

sitelocationId

string($uuid)

Unique Site Location Id. This value is identical to the customer Id if the customer only has a single site location. See Get Site Location.

dialplanId

string

The name of the dial plan.

Request Body

Parameters

Type

Description

dialPlanId

string

Dial plan name. Default 'CustDialPlan'.

add

list array

List array including the following parameters:

name
prefix
tag

name

string

Name of the dial plan rule that is applied to the site. See Manage SBC Prefixes and Show Prefixes.

prefix

string

The calling prefixes to add for users for this site location. For example "{{+019123854567}}"

tag

string

The Derived Trunk FQDN of the SBC device used to manage calls for this site location. For example, "{{EMEA.Customers.AudioCodes.com}}".

If a number is added with a tag that is not an AudioCodes SBC PSTN gateway, then for the purpose of User licensing calculations, its counted as a Service Number license factor. For more information, see User Licenses.

Example Body

Copy
{
  "dialPlanId": "CustDialPlan",
  "add": [
    {
      "name": "audiocodesru",
      "prefix": "+972542566110",
      "tag": "audiocodesru.sbc.com"
    },
    {
      "name": "audiocodesru",
      "prefix": "+972542566111",
      "tag": "audiocodesru.sbc.com"
    }
  ],
  "remove": [
    {
      "name": "audiocodesru",
      "prefix": "+972542566112",
      "tag": "audiocodesru.sbc.com"
    },
    {
     "name": "audiocodesru",
      "prefix": "+972542566113",
      "tag": "audiocodesru.sbc.com"
    }
  ]
}

HTTP Responses

The initial response displays the Task Id.

Parameter

Type

Description

Task Id

string

The queued task Id that is generated for this action. You must run the Task request to retrieve the status of the action. See Task Status. Note that the tsk string in the prefix is unique for this endpoint.

Copy
{
    "taskId": "tsk_1156",
    "dialPlanName": "CustDialPlan",
    "error": null
}

The execution of the request may take a few minutes. The status will progress from 'In Progress' to 'Completed Success'.

Copy
{
    "id": "tsk_1157",
    "status": "Queued",
    "details": [
        null
    ],
    "executionMessages": null,
    "outputData": {}
}
Copy
{
    "id": "tsk_1156",
    "status": "CompletedSuccess",
    "details": [
        "Ok"
    ],
    "executionMessages": null,
    "outputData": {}
}

Example Response

The following shows an example response to the SBC prefix retrieval operation above.

Copy
[
  {
    "dialPlanId": "CustDialPlan",
    "ruleDTO": [
      {
        "name": "Demo1Site2",
        "prefix": "20001",
        "tag": "PstnDemo1"
      },
      {
        "name": "Demo1Site2",
        "prefix": "20002",
        "tag": "PstnDemo1"
      },
      {
        "name": "Demo1Site2",
        "prefix": "20004",
        "tag": "PstnDemo1"
      }
    ]
  }
]

HTTP Responses

200 OK

Parameter

Type

Description

taskId

string

The task Id.

status

string

One of the following:

Completed Success
In Progress
Completed Failed

details

string

Additional information on the task. e.g. OK

executionMessages

string

TBD

outputData

string

TBD